package com.example.mapper.yijie;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.domain.dingdan;
import com.example.domain.yijie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface yijieQuery extends BaseMapper<yijie> {
    @Select("SELECT childrens_articles.id,title,category,fit,rent,freight,deposit,addres,phone,describes,imgurl1,imgurl2,imgurl3,leixin1,leixin2,leixin3,num,state,userid,user_lease.leixin as leixin,user_lease.starttime as starttime,user_lease.overtime as overtime,user_lease.number as number,user_lease.feiyong as feiyong,user_lease.order_number as order_number FROM childrens_articles,user_lease where user_lease.articlesid= childrens_articles.id and user_lease.user_openid=${user_openid} And user_lease.order_number != '0' ")
    List<yijie> findlease(String user_openid);

    @Select("SELECT childrens_articles.id,title,category,fit,rent,freight,deposit,addres,phone,describes,imgurl1,imgurl2,imgurl3,leixin1,leixin2,leixin3,num,state,userid,user_lease.leixin as leixin,user_lease.starttime as starttime,user_lease.overtime as overtime,user_lease.yuqitime as yuqitime,user_lease.yuqifeiyong as yuqifeiyong,user_lease.number as number,user_lease.feiyong as feiyong,user_lease.order_number as order_number FROM childrens_articles,user_lease where user_lease.articlesid= childrens_articles.id")
    List<yijie> findlease1(String user_openid);

    @Select("SELECT childrens_articles.id,title,category,fit,rent,freight,deposit,addres,phone,describes,imgurl1,imgurl2,imgurl3,leixin1,leixin2,leixin3,num,state,userid,user_lease.leixin as leixin,user_lease.starttime as starttime,user_lease.overtime as overtime,user_lease.number as number,user_lease.feiyong as feiyong,user_lease.order_number as order_number FROM childrens_articles,user_lease where user_lease.articlesid= childrens_articles.id and user_lease.user_openid=${user_openid}")
    List<yijie> findcomment(String user_openid);
}
